package lab02.test19;

public class ConversionString {
    public void reverseString(String str) {      //创建大小写转换的方法
        char[] ch = str.toCharArray();
        for(int i = 0; i < ch.length; i++) {
            if(ch[i] >= 'A' && ch[i] <= 'Z') {
                char c = (char)(ch[i] + 32);
                System.out.print(c);
            }else if (ch[i] >= 'a' && ch[i] <= 'z') {
                char c = (char)(ch[i] - 32);
                System.out.print(c);
            }
        }
    }
}
